#ifndef __RTTHREAD_THREAD_H__
#define __RTTHREAD_THREAD_H__

#include "rt_def.h"
#include "rt_list.h"

struct rt_thread
{
   void        *sp;               /* 线程栈指针 */
   void        *entry;           /* 线程入口地址 */
   void        *parameter;       /* 线程形参 */
   void        *stack_addr;      /* 线程起始地址 */
   rt_uint32_t stack_size;       /* 线程栈大小，单位为字节 */
   rt_list_t   tlist;            /* 线程链表节点 */
};
typedef struct rt_thread *rt_thread_t;

rt_err_t rt_thread_init(struct rt_thread *thread,
                        void (*entry)(void *parameter),
                        void             *parameter,
                        void             *stack_start,
                        rt_uint32_t       stack_size);



#endif /* __RTTHREAD_THREAD_H__ */
